﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class Controls_nAD : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            Content_Down_ad();
        }
    }
    public void Content_Down_ad()
    {
        DataTable dt6 = Class1.ExecSel("select ad_Lock,ad_Url,ad_Img,ad_Location,ad_Time from AD  order by ad_ID desc");
        if (dt6.Rows[0]["ad_Lock"].ToString() == "0" )
        {
            if (dt6.Rows[0]["ad_Location"].ToString() == "8")
            {
                ad7.Text = "<a href=" + dt6.Rows[0]["ad_Url"].ToString() + " target=_blank><img src=" + dt6.Rows[0]["ad_Img"].ToString() + " border=0 width=957 height=30/></a>";
            }
        }
    }
}
